README File for "`Because He's Gay': How Race, Gender, and Sexuality Shape Perceptions of Judicial Fairness"
by Ana Bracic, Mackenzie Israel-Trummel, Tyler Johnson, and Kathleen Tipler
Journal of Politics

#############
#
# Overview
# 
#############

This README file provides an inventory of all code used in the analysis. It also contains information on the relevant data sets used.

#############



#############
#
# Notes on OS and Software
#
#############
All code was written on MacOS version 12.6
R code was written using R 4.1.2 and RStudio 2022.07.1
Stata code was written using Stata 14.2
All code was replicated on Windows 10 and using Stata 16.




#############
#
# Notes on Code
#
#############
Files are named numerically as they should be run. 

Within scripts, code is organized sequentially based on reporting of the relevant analyses in the paper, with descriptive headings calling out each analysis and specific steps.

Data files are loaded from and tables and figures are saved to the active working directory. 

Specific files are as follows:

Analysis files (Main Text)

1_Conjoint Set Up.R
2_Conjoint Analysis Democrats.R
3_Conjoint Analysis Republicans.R
5_Open Ended Analysis.do

Analysis files (Supplemental/Appendix)
4_Conjoint Analysis Appendix.R


#############
#
# Notes on Data
#
#############
The analyses use the following data sets:
1_Conjoint Set Up.R pulls from the raw data set: conjoint_judgesdata.csv

This code file will then create a csv file titled stackedconjointdata.csv

2_Conjoint Analysis Democrats.R, 3_Conjoint Analysis Republicans.R, and 4_Conjoint Analysis Appendix.R use the stackedconjointdata.csv created in 1_Conjoint Set Up.R to conduct the statistical analyses. These files also use a csv file called conjointvariablesSHORT.csv to create the plots.

5_Open Ended Analysis.do uses conjoint_judges_open_ended.dta which contains our open-ended response data. 


#############
#
# Notes on Log Files
#
#############

There are log files for each of our code files. The log files for the R code was created using the sink(), readChar(), and getSourceEditorContext() functions.





